// 商品分类接口
import request from '@/utils/request'
import type { CategoryTopItem } from '@/types/category'

enum API {
  // 获取一级和二级分类
  category_url = '/category/top'
}

// 获取一级和二级分类
export const reqCategory = () => {
  return request<CategoryTopItem[]>({
    url: API.category_url,
    method: 'GET'
  })
}
